<%@ page language="java" session="true" contentType="text/html; charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.google.gson.*"%>
<%@ page import="cz.acies.genea.data.dao.*"%>
<%@ page import="cz.acies.genea.data.process.*"%>
<%@ page import="org.apache.commons.beanutils.BeanUtils"%>
<%@ page import="org.apache.commons.lang3.time.DateFormatUtils"%>

<%@ page pageEncoding="UTF-8" %>
<% request.setCharacterEncoding("UTF-8");  %>
<% response.setCharacterEncoding("UTF-8");  %>
<%
Gson gson = new Gson();
Map<String, Object> params = new HashMap<String, Object>();
Enumeration<String> e = request.getParameterNames();
while (e.hasMoreElements()) {
	String key =  e.nextElement();
	params.put(key, request.getParameter(key));
}
String processId = (String) params.get("processId");
//System.out.println("desktop_ajax.params:"+params);

if (processId.equals("loadModul")) {
	String modulId = params.containsKey("modulId") ? ""+params.get("modulId") : "";
	if (modulId.startsWith("MN.R.")) {
		String pageName = "empty.jsp";
		if (modulId.equals("MN.R.000001")) {
			pageName = "person_modul.jsp";
		} else if (modulId.equals("MN.R.000002")) {
			pageName = "user_edit.jsp";
		}
		String path = application.getContextPath();
		String content = 
		"<iframe scrolling=\"auto\" " + 
			"frameborder=\"0\" " +
			"src=\""+path+"/pages/" + pageName + "\" " +
			"style=\"width:100%;height:100%;\">" +
		"</iframe>";
		out.write(content);
	} else {
		out.write("");
	}
} else if (processId.equals("")) {
	
}

%>
